<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mycss3</title>
    <style>
        html {
            font-size: 16px;
        }
        .c1 {
            font-size: 2rem;  /*相对于根元素大小*/
        }
        .c2 {
            font-size: 2em;  /*当前大小的2倍*/
            /*color: rgb(100, 100, 100);*/
            color: #0a469c
        }
        .google {
            font-size: 64px;
        }
        .g1 {
            color: #2d85f0;
        }
        .g2 {
            color: #f4433c;
        }
        .g3 {
            color: #ffbc32;
        }
        .g4 {
            color: #0aa858;
        }
    </style>
</head>
<body>
<div class="google">
    <span class="g1">G</span>
    <span class="g2">o</span>
    <span class="g3">o</span>
    <span class="g1">g</span>
    <span class="g4">l</span>
    <span class="g2">e</span>
</div>
<div class="c1">
    这是外层div
    <div class="c2">
        这是内层div
    </div>
</div>
</body>
</html>